/**
 * @description: Login interface parameters
 */
export interface LoginParams {
  username: string;
  password: string;
  grant_type: string;
  uuid: string;
  code: string;
  tenantId: string;
}

export interface PasswordParams {
  passwordNew: string;
  passwordOld: string;
}

export interface RoleInfo {
  name: string;
  value: string;
}

export interface AppInfo {
  name: string;
  code: string;
  icon: string;
  active: boolean;
}

/**
 * @description: Login interface return value
 */
export interface LoginResultModel {
  userId: string | number;
  token: string;
  role: RoleInfo;
  access_token: string;
  avatar: string;
  jti: string;
  refreshToken: string;
  roleId: string | number;
  tenantId: string;
  userName: string;
}

/**
 * @description: Get user information return value
 */
export interface GetUserInfoModel {
  roles: RoleInfo[];
  // 用户id
  id: string | number;
  userId: string | number;
  // 用户名
  username: string;
  // 真实名字
  nickname: string;
  // 头像
  avatar: string;
  // 介绍
  desc?: string;
  // 介绍
  perms: string[];
  apps: AppInfo[];
}

export interface GetCaptchaModel {
  // 验证码图片base64
  captchaImage: string;
  // 惟一key
  captchaKey: string;
}
